<template>
  <div class="footer">
    <div class="header" v-if="!isLoggedIn">
      <span v-if="!isLoggedIn">你还没有登陆，请进行<a href="#/login">登录</a></span>
    </div>
    <div class="content">
      <a href="#/index" >首页</a>
      <a href="#/education" >教育</a>
      <a href="#/user">我的</a>
    </div>
  </div>
</template>

<script>
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'HomeView',
  components: {
    HelloWorld
  },
  data() {
    return {
      isLoggedIn: false,
    }
  },
  methods: {
    checkLoginStatus() {
      // 检查用户登录状态的逻辑，例如：
      const token = localStorage.getItem('jwt');
      if (token) {
        this.isLoggedIn = true;
      } else {
        this.isLoggedIn = false;
      }
    },
  },
  mounted() {
    this.checkLoginStatus();
  },

}
</script>

<style>
@import "@/style/home.css";
</style>
